<?php
$user=$_POST['user'];
$pwd=$_POST['pwd'];
$exitUser=["zhangsan","lisi","wangwu"];
if(in_array($user,$exitUser)){
    echo "此用户已经被注册";
}
else if($user==null){
    echo "用户名不能为空";
}
else{
    echo "√";
}


?>